<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Blog管理系统-登录</title>
  <!-- 样式导入 -->
  <link rel="stylesheet" href="../lib/layui/css/layui.css">
  <link rel="stylesheet" href="../css/login.css">
</head>

<body>
  <!-- 登录容器 -->
  <div class="login-container">
    <!-- 左侧图片 -->
    <div class="left-bg"></div>
    <!-- 右侧界面 -->
    <div class="right-main">
      <!-- 登录内容 -->
      <div class="content login">
        <!-- 通过设置 lay-filter属性 从而可实现获取表单值与设置表单值 val(表单名, 值) -->
        <form class="layui-form" lay-filter="login-form">
          <!-- 标题 -->
          <h2 class="title">登录</h2>
          <!-- 用户名 -->
          <div class="layui-form-item">
            <i class="layui-icon layui-icon-username"></i>
            <!-- 通过设置 lay-verify属性进行表单校验 required[必填] phone[手机号] email[邮箱号]-->
            <input type="text" placeholder="请输入用户名" class="layui-input" lay-verify="required|username" name="username">
          </div>
          <!-- 密码 -->
          <div class="layui-form-item">
            <i class="layui-icon layui-icon-password"></i>
            <input type="password" placeholder="请输入密码" class="layui-input" lay-verify="required|password" name="password">
          </div>
          <!-- 登录按钮 -->
          <div class="layui-form-item">
            <!-- 通过配置  lay-submit属性触发校验规则-->
            <button class="layui-btn layui-btn-normal layui-btn-fluid" lay-submit>登录</button>
          </div>
          <!-- 切换注册按钮 -->
          <div class="layui-form-item login-link">
            <a href="#" id="go-reg">去注册账号</a>
          </div>
        </form>
      </div>
      <!-- 注册内容 -->
      <div class="content reg">
        <form class="layui-form" lay-filter="reg-form">
          <!-- 标题 -->
          <h2 class="title">注册</h2>
          <!-- 用户名 -->
          <div class="layui-form-item">
            <i class="layui-icon layui-icon-username"></i>
            <input type="text" placeholder="请输入用户名" class="layui-input" lay-verify="required|username" name="username">
          </div>
          <!-- 密码 -->
          <div class="layui-form-item">
            <i class="layui-icon layui-icon-password"></i>
            <input id="reg-password" type="password" placeholder="请输入密码" class="layui-input" lay-verify="required|password" name="password">
          </div>
          <!-- 确认密码 -->
          <div class="layui-form-item">
            <i class="layui-icon layui-icon-password"></i>
            <input type="password" placeholder="请再次输入密码" class="layui-input" lay-verify="required|password|rpPassword">
          </div>
          <!-- 登录按钮 -->
          <div class="layui-form-item">
            <button class="layui-btn layui-btn-normal layui-btn-fluid" lay-submit>注册</button>
          </div>
          <!-- 切换注册按钮 -->
          <div class="layui-form-item login-link">
            <a href="#" id="go-login">登录账号</a>
          </div>
        </form>
      </div>
    </div>
  </div>

  <!-- JS导入 -->
  <script src="../lib/layui/layui.all.js"></script>
  <script src="../lib/jquery.js"></script>
  <script src="../js/login.js"></script>
</body>

</html>